package com.turing.post.report.util;

import java.io.Serializable;
import java.math.BigInteger;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 文件资料表
 * 
 * @author zxp
 * @Jan 25, 2013
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "BinaryFileInfo")
public class BinaryFileInfo implements Serializable {

	/**
	 * 图片类型
	 */
	public static final String IMAGE = "0";

	/**
	 * excel类型
	 */
	public static final String XLS = "1";

	/**
	 * XML类型
	 */
	public static final String XML = "2";
	
	private BigInteger fileId;// 文件ID int Not Null
	private String fileType;// 文件类型 varchar(20) Not Null .xls, .pdf, .png, .jpg等
	private Integer fileLength;// 文件长度 int Not Null
	private byte[] fileContent;// 文件内容 blob Not Null
    private String fileName;//风险上报文件名称 null
    private byte[] backFile;//风险银行回执文件 null
    private String backFileName;//风险银行回执文件名称 null
	public BinaryFileInfo() {

	}

	@Id
	@Column(name = "FILEID", nullable = false)
	public BigInteger getFileId() {
		return fileId;
	}

	public void setFileId(BigInteger fileId) {
		this.fileId = fileId;
	}

	@Column(name = "FILETYPE")
	public String getFileType() {
		return fileType;
	}

	public void setFileType(String fileType) {
		this.fileType = fileType;
	}

	@Column(name = "FILELENGTH")
	public Integer getFileLength() {
		return fileLength;
	}

	public void setFileLength(Integer fileLength) {
		this.fileLength = fileLength;
	}

	@Column(name = "FILECONTENT")
	public byte[] getFileContent() {
		return fileContent;
	}

	public void setFileContent(byte[] fileContent) {
		this.fileContent = fileContent;
	}
	@Column(name = "FILENAME")
	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	@Column(name = "BACKFILE")
	public byte[] getBackFile() {
		return backFile;
	}

	public void setBackFile(byte[] backFile) {
		this.backFile = backFile;
	}
	@Column(name = "BACKFILENAME")
	public String getBackFileName() {
		return backFileName;
	}

	public void setBackFileName(String backFileName) {
		this.backFileName = backFileName;
	}
}